package com.xhsj.user.pms.patent.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xhsj.user.pms.patent.domain.TbPamInventorProposalIpr;
import com.xhsj.user.pms.patent.query.OperationerListQuery;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 发明人建议IPR Mapper 接口
 * </p>
 *
 * @author liuqinghua
 * @since 2020-07-06
 */
@Mapper
public interface TbPamInventorProposalIprMapper extends BaseMapper<TbPamInventorProposalIpr> {

    // 通过交底书id获取实体类详细信息
    List<Long> getAdviceIpr(@Param("disclosureId") String disclosureId);

    // 根据交底书id删除指派ipr信息
    int deleteByDisclosure(@Param("disclosureId") String disclosureId);
   // 查询发明人建议
    List<Long> getUserIdByDisclosureId(@Param("disclosureId") String disclosureId);

    // 查询发明人建议
    List<Map<String, Object>> getDisclosureIpr(@Param("disclosureId")String disclosureId);

    // 修改创建者建议的ipr
    int updateByDisclosureId(@Param("identitylinkForDisclosure")String identitylinkForDisclosure,
                             @Param("userId")Integer userId,
                             @Param("createBy")String createBy);

    @MapKey("disclosureId")
    Map<String, OperationerListQuery> getAdviceIprList(@Param("disclosureIdList") List<String> disclosureIdList);
}
